package com.hospital.demo.mapper.zhangweibo;

import com.hospital.demo.model.zhangweibo.Finance;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface FinanceMapper {
    //查询全部信息
    @Select("SELECT * from finance")
    List<Finance> SelectAllFinance();
    //按ID查询信息
    @Select("SELECT * from finance where Finance.fid=#{fid}")
    List<Finance> SelectById(@Param("fid") Integer fid);
@Update("Update finance f set f.fnumber=#{fnumber} where f.fid=#{fid}")
    Integer UpdateFinance(@Param("fnumber") Integer funmber, @Param("fid") Integer fid);
    //按ID查询信息
    @Select("SELECT fnumber from finance ")
    List<Integer> SelectFnb();
}
